    package Server;

import Server.Queue.PersonQueueSorted;
import Server.Queue.PersonQueue;
import Const.ServerConst;
import java.io.Serializable;

/**
 *
 * Class description goes here.
 *
 * @author Kamil Gajowy
 */
public class ClientList implements Serializable {
    private PersonQueue qWaiting;
    private PersonQueue qTraveling;
    private PersonQueue qConnected;

    /**
    * Default constructor.
    */
    public ClientList(){
        this.qWaiting = new PersonQueueSorted(ServerConst.QueueInfinity);
        this.qTraveling = new PersonQueue(ServerConst.QueueLimited);
        this.qConnected = new PersonQueue(ServerConst.QueueInfinity);
    }

    public PersonQueue getWaitingQueue(){
        return this.qWaiting;
    }

    public PersonQueue getTravelingQueue(){
        return this.qTraveling;
    }

    public PersonQueue getConnectedQueue(){
        return this.qConnected;
    }

    public boolean isLiftFull(){
        if ( this.qTraveling.getClientList().size()
                == ServerConst.LiftMaxPerson ){
            return true;
        }else{
            return false;
        }
    }

    public int getPersonInLiftCount(){
        return this.qTraveling.getClientList().size();
    }

}//end class
